import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'myPipe'
})
export class MyPipePipe implements PipeTransform {

  transform(value: any, args?: any): any {
    const reg = /^(\d{4})-(\d{2})-(\d{2})\s(.+)$/;
    if (reg.test(value)) {
      return value.replace(reg, '$1年$2月$3日');
    }
    return value;
  }

}
